package com.zlyx.easy.redis.supports;

import com.zlyx.easy.asyn.model.AsynMessage;
import com.zlyx.easy.asyn.supports.AsynMsgSender;
import com.zlyx.easy.redis.utils.RedisUtils;

/**
 * @Auth 赵光
 * @Describle
 * @2019年9月7日
 */
public class RedisMsgSender implements AsynMsgSender {

	@Override
	public void doQuque(String channel, String msg) {
		throw new UnsupportedOperationException("不支持QUEUE消息类型");
	}

	@Override
	public void doTopic(String channel, String msg) {
		RedisUtils.publish(RedisUtils.DEFAULT_CHANNEL, AsynMessage.newMessage(channel, msg));
	}

}
